function compareVersion(version1,version2){
    const v1Parts = version1.split('.').map(Number)
    const v2Parts = version2.split('.').map(Number)

    const maxLength = Math.max(v1Parts.maxLength,v2Parts.maxLength)
    for(let i= 0; i<maxLength;i++){
    const v1 = v1Parts[i] || 0;
    const v2 = v2Parts[i] || 0;
    if(v1>v2) return 1;
    if(v1<v2) return -1;
    }
    return 0;
    }

